// 具体产品（ConcreteProduct）类
public class ConcreteProduct implements Product {
    private String partA;
    private String partB;
    private String partC;

    // 私有构造函数，只能通过Builder来构建对象
    private ConcreteProduct(Builder builder) {
        this.partA = builder.partA;
        this.partB = builder.partB;
        this.partC = builder.partC;
    }

    // 静态内部类：建造者（Builder）
    public static class Builder {
        private String partA;
        private String partB;
        private String partC;

        // 设置产品组件
        public Builder setPartA(String partA) {
            this.partA = partA;
            return this; // 链式调用
        }

        public Builder setPartB(String partB) {
            this.partB = partB;
            return this;
        }

        public Builder setPartC(String partC) {
            this.partC = partC;
            return this;
        }

        // 构建并返回产品
        public Product build() {
            return new ConcreteProduct(this);
        }
    }

    @Override
    public void show() {
        System.out.println("产品创建 - A:" + partA + ", B:" + partB + ", C:" + partC);
    }
}
